#!/bin/sh
cd /tmp/
curl 'http://boards.4chan.org/s4s/' |
    egrep -o '<div class="postContainer (op|reply)Container" id="pc([0-9]+)">' |
    sed -ne 's/.*id="pc\(.*\)">/\1/p' |
    sort -r |
    head -n 1
